package app.netant.book.book365;

import cn.lily.com.enviroment.Enviroment;
import app.netant.book.base.BaseDetail;
import app.netant.book.base.BaseEntity;
import app.netant.book.base.BasePage;
import app.netant.book.base.BaseRoot;

public class Book365Root extends BaseRoot {
	
	public Book365Root(){
		this.homeUrl = "http://www.365book.net/i-chuanyue/";
		this.pageUrl = "http://www.365book.net/i-chuanyue/";
		this.tableKey = "book365";
	}

	@Override
	public String buildUrl(int pageIdx) {
		return this.pageUrl + pageIdx+"";
	}

	@Override
	public BasePage buildPage(String url) {
		return new Book365Page(url);
	}

	@Override
	public BaseDetail buildDetail(String url) {
		return new Book365Detail(url);
	}

	@Override
	public BaseEntity buildEntity() {
		return new Book365Entity();
	}
	
	@Override
	public void afterEntity(BaseEntity entity) {
		
	}
	
	public static void main(String[] args) {
		
		Enviroment.createEnv();
		Enviroment.getEnv().getLogBean().beginLog();
		
		Book365Root root = new Book365Root();
		root.analyse(863);
		//root.excepCycle();
	}


	
}
